/*package com.bms.common.base.common.util;

import java.io.File;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import com.feilong.core.Validator;

import jodd.mail.Email;
import jodd.mail.EmailAttachment;
import jodd.mail.EmailAttachmentBuilder;
import jodd.mail.SendMailSession;
import jodd.mail.SmtpSslServer;

*//**
 * 
 * @ClassName: EmailUtil
 * @Description: 邮件发送工具类,封装了jodd的mail工具类
 * @author xujian
 *//*
@Component
@PropertySource("classpath:email.properties")
public class EmailUtil {
	
	@Value("${mail.service.username}")
	private String userName;

	@Value("${mail.service.password}")
	private String password;
	
	@Value("${mail.service.smtp}")
	private String smtp;
	
	@Value("${mail.to}")
	private String to;

	public boolean sendMail(String subject, String text,File file,String type,String sendTo){
		Email email = Email.create().from(userName)
				.subject(subject).addHtml(text, "utf-8");
		if(Validator.isNullOrEmpty(sendTo)){
			email.to(to);
		}else{
			email.to(sendTo.split(","));
		}
		if(null != file){
			EmailAttachmentBuilder attachment = EmailAttachment.attachment();
			email.attach(attachment);
		}
		SmtpSslServer sslServer =SmtpSslServer.create(smtp).authenticateWith(userName, password);
		SendMailSession session = sslServer.createSession();
		session.open();
		session.sendMail(email);
		session.close();
		return true;
	}
}
*/